/*
I just wanna swing and fly away.
This is crd from Nanjing No.1 Middle School.
You'll never walk alone.
*/
#include <bits/stdc++.h>
using namespace std;
int n;
int a[100010];
int main(){
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    for(int i=1;i<=n;i++)cin>>a[i];
    sort(a+1,a+n+1);
    priority_queue<int,vector<int>,greater<int> > pq;
    for(int i=1;i<=n;i++){
        pq.push(a[i]);
        if(a[i]>pq.top())pq.pop();
    }
    cout<<pq.size()<<endl;
    return 0;
}